module mBLAS

        implicit none

        public

        !**************
        ! Dot Product: x.y
        !**************
        interface xDOT
                real(4) function SDOT(N, X, INCX, Y, INCY)
                        integer :: N, INCX, INCY
                        real(4) :: X(N), Y(N)
                end function SDOT

                real(8) function DDOT(N, X, INCX, Y, INCY)
                        integer :: N, INCX, INCY
                        real(8) :: X(N), Y(N)
                end function DDOT
        end interface xDot

        !*****************************************************************
        ! Symmetric Packed matrix-vector product: alpha*AP*x + beta*y -> y
        !*****************************************************************
        interface xSPMV
                subroutine SSPMV(UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY)
                        character(len = 1) :: UPLO
                        integer :: INCX, INCY, N
                        real(4) :: ALPHA, BETA
                        real(4) :: AP(*), X(*), Y(*)
                end subroutine SSPMV

                subroutine DSPMV(UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY)
                        character(len = 1) :: UPLO
                        integer :: INCX, INCY, N
                        real(8) :: ALPHA, BETA
                        real(8) :: AP(*), X(*), Y(*)
                end subroutine DSPMV
        end interface xSPMV

        !*****************************************************************
        ! Symmetric  matrix-matrix product: alpha*A*B + beta*C -> C
        !*****************************************************************
        interface xSYMM
                subroutine SSYMM(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, &
                                 BETA, C, LDC)
                        character(len = 1) :: SIDE, UPLO
                        integer :: M, N, LDA, LDB, LDC
                        real :: ALPHA, BETA
                        real :: A(LDA, *), B(LDB, *), C(LDC, *)
                end subroutine SSYMM

                subroutine DSYMM(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, &
                                 BETA, C, LDC)
                        character(len = 1) :: SIDE, UPLO
                        integer :: M, N, LDA, LDB, LDC
                        double precision :: ALPHA, BETA
                        double precision :: A(LDA, *), B(LDB, *), C(LDC, *)
                end subroutine DSYMM
        end interface xSYMM

end module mBLAS
